<template>
  <div class="goods-class">
    商品列表占位符
  </div>
</template>

<script setup>
import { computed } from 'vue';
import { checkUrl } from '@/sheep/utils/checkUrlSuffix';

const props = defineProps(['compData']);
const listData =  computed(()=>props.compData.data.templateList[props.compData.data.tabIndex])
const wrapStyle = computed(() => ({
  display: 'flex',
  'flex-wrap': 'wrap',
  margin: `-${listData.value.space / 2}px`,
}));
const itemStyle = computed(() => ({
  width: `${listData.value.mode == 2 ? '50%' : '100%'}`,
  padding: `${listData.value.space / 2}px`,
  'flex-shrink': 0,
}));

const itemWrapStyle = computed(() => ({
  'border-radius': `${listData.value.borderRadiusTop}px ${listData.value.borderRadiusTop}px ${listData.value.borderRadiusBottom}px ${listData.value.borderRadiusBottom}px`,
}));
</script>
<style lang="scss" scoped>
.goods-class {
  width:100%;
  height: 40xp;
  .goods-class-head{
    height: 40px;
    overflow-x: scroll;
    position: relative;
    .goods-class-head-item{
      font-size: 15px;
      color: #666666;
      max-width: 85px;
      min-width: 85px;
      text-align: center;
      transition: 0.2s;
    }
    .goods-class-head-item-active{
      font-size: 18px !important;
      color: #333333 !important;
      font-weight: 600;
    }
    .active-line{
      position: absolute;
      width: 22px;
      height: 3px;
      background: #E96977;
      left: calc((85px - 22px)/2);
      transition: 0.3s;
      bottom: 5px;
      border-radius: 2px;
    }

    &::-webkit-scrollbar {
        width: 0px !important;
        height: 0px !important;
    }
  }
  .item-wrap {
    background: #fff;
    // box-shadow: 0 5px 21px 0 rgba(234, 234, 234, 0.46);
    position: relative;
    overflow: hidden;
    font-size: 12px;
    .tag {
      position: absolute;
      top: 0;
      left: 0;
      z-index: 2;
      .sa-image {
        width: 36px !important;
        height: 22px !important;
      }
    }
    .desc {
      padding: 10px;
      flex: 1;
      .title {
        font-size: 14px;
      }
      .promos {
        height: fit-content;
      }
      .promo-tag {
        flex-shrink: 0;
        height: 18px;
        display: flex;
        align-items: center;
        justify-content: center;
        border-radius: 4px;
        border: 1px solid #f00;
        padding: 0 4px;
        font-size: 12px;
        color: #f00;
        margin-right: 4px;
      }

      .promo-tag:last-of-type {
        margin-right: 0;
      }
    }
    .button {
      position: absolute;
      right: 10px;
      bottom: 10px;
      height: 24px;
      line-height: 24px;
      font-size: 12px;
      color: #fff;
      padding: 0 12px;
      border-radius: 12.5px;
      background: linear-gradient(90deg, #fe8900, #ff5e00);
      background-size: 100% 100% !important;
    }
  }
  .goods-class-wrap-1 {
    .sa-image {
      width: 100%;
      height: 140px;
    }
  }
  .goods-class-wrap-2 {
    .sa-image {
      width: 100%;
      height: 140px;
    }
  }
  .goods-class-wrap-3 {
    .item-wrap {
      display: flex;
      height: 140px;
      .sa-image {
        width: 140px;
        height: 140px;
      }
      .desc {
        display: flex;
        flex-direction: column;
        justify-content: space-between;
      }
    }
  }
}
</style>
